package com.sydata.cdrdata.mapper;

import com.sydata.cdrdata.domain.AgentFlowRecord;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 订单Mapper接口
 */
@Repository
public interface LinksFieldCdrSettlementMapper {


    /**
     * 查询领科话单汇总数据 按m渠道、mcc和和日期分组先汇总
     *
     * @return
     */
    public List<Map<String, Object>> getLkCdrRecordList();

    public Map<String, Object> getRatioByMccAndChannel(@Param("channelId") String channelId, @Param("simTypeId") String simTypeId ,@Param("mcc") String mcc);

    /**
     * 更新渠道账户余额
     *
     * @param supplierId
     * @param channelId
     * @param money
     * @return
     */
    public int updateChannelBalance(@Param("supplierId") String supplierId, @Param("channelId") String channelId, @Param("money") double money);

    /**
     * 新增结算记录
     * @param agentFlowRecord
     * @return
     */
    public int insertAgentFlowRecord(AgentFlowRecord agentFlowRecord);

}



